<template>
	<commonReport :reportData="reportData" :orderNo="orderNo">
		<template v-slot:title>
			<view class="reportTitle">信用报告-普通版</view>
		</template>
	</commonReport>
</template>
<script>
	import * as echarts from 'echarts'
	import commonReport from '@/components/commonReport.vue'
	import {
		bdTemInfo
	} from '@/utils/temInfo.js'
	import {
		query
	} from '@/api/jinjian.js'

	export default {
		components: {
			commonReport
		},
		data() {
			return {
				reportData: {},
				orderNo: undefined
			}
		},
		onLoad(options) {
			this.$modal.loading("正在查询...")
			if (options.orderNo) {
				this.orderNo = options.orderNo
				query({
					orderNo: this.orderNo,
					name: 2
				}).then(res => {
					if (res.code == 200) {
						res.data.queryInfo = JSON.parse(res.data.queryInfo).dttz
						// console.log('--res.data--', res.data)
						this.reportData = res.data
						this.$modal.closeLoading()
					} else {
						this.$modal.msgError(res.msg)
					}
				})
			} else {
				this.reportData = bdTemInfo
				this.$modal.closeLoading()
			}
		}
	}
</script>
<style scoped>
	.reportTitle {
		font-size: 24px;
		font-weight: 600;
		color: #fff;
		margin: 30px 0 13px 0;
		text-align: center;
	}
</style>